import request from '../utils/request'

export function listUsers(params) {
  return request({
    url: '/api/user/list',
    method: 'get',
    params,
  })
}

export function updateUser(data) {
  return request({
    url: '/api/user/update',
    method: 'put',
    data,
  })
}

export function exportUserExcel() {
  return request({
    url: '/api/user/excel/export',
    method: 'get',
    responseType: 'blob'
  })
}

export function importUserExcel(file) {
  const formData = new FormData()
  formData.append('file', file)
  return request({
    url: '/api/user/excel/import',
    method: 'post',
    data: formData,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
} 